#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "model/scene.h"


class Widget;
class Projection;

class MainWindow : public QMainWindow {
    Q_OBJECT

    //-------------------------------------------------------------//
    //                          ATTRIBUTES                         //
    //-------------------------------------------------------------//

protected:
    Scene* scene;
    Projection* projection;

    //-------------------------------------------------------------//
    //                           METHODS                           //
    //-------------------------------------------------------------//

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

    Scene *getScene();
    Widget *getWidget();

    void open(QString filename, unsigned int width, unsigned int height, unsigned int rows, unsigned int columns);

protected:
    void initFileMenu();
    void initViewMenu();
    void initLightingMenu();

    void setProjection(Projection *projection);
    void setShading(Filler* shading);
    void setGround(Object* ground);

    //-------------------------------------------------------------//
    //                           SLOTS                             //
    //-------------------------------------------------------------//

public slots:
    void open();
    void openFromImage();
    void save();
    void randomize();
    void resetView();
    void smoothGround();

    void toIsometrictProjection();
    void toPerspectiveProjection();

    void toZBuffer();
    void toWireframe();
    void toConstantShading();
    void toGouraudShading();

    void lightingProperties();
};

#endif // MAINWINDOW_H

